package com.accp.vehiclecare.dao.xzhdao;

import com.accp.vehiclecare.pojo.Jurisdiction;
import com.accp.vehiclecare.vo.xzhvo.FunctionVO;
import com.accp.vehiclecare.vo.xzhvo.JurisdictionVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.*;

/**
 * 权限dao
 */
public interface JurisdictionDao extends BaseMapper<Jurisdiction> {
    /**
     * 查询父级权限下的子权限
     * @return
     */
    List<JurisdictionVO> queryJurisdictionFunction();

    /**
     * 查询角色权限
     * @param jurisdictionid
     * @return
     */
    List<FunctionVO> queryFunction(@Param("jurisdictionid") Integer jurisdictionid);

    /**
     * 删除角色权限
     * @param jurisdictionid
     * @return
     */
    Integer removeJurisdiction(@Param("jurisdictionid") Integer jurisdictionid);

    /**
     * 新增角色权限
     * @param jurisdictionid
     * @param roleJurisdictions
     * @return
     */
    Integer addJurisdiction(@Param("jurisdictionid") Integer jurisdictionid,@Param("roleJurisdictions") List<Integer> roleJurisdictions);

}
